<template>
  <view class="my-search-container" :style="{'background-color':bgColor}" @click="searchBoxHandler">
    <view class="my-search-box" :style="{'border-radius':radius + 'px'}">
      <uni-icons type="search" class="placeholder" size="17"></uni-icons>
      <text>搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props:{
      bgColor:{
        type:String,
        default:"#C00000"
      },
      radius:{
        type:Number,
        default:18
      }
    },
    methods:{
      searchBoxHandler(){
        console.log('ok')
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.my-search-container{
  height: 50px;
  display: flex;
  align-items: center;
  .my-search-box{
    background-color: #fff;
    height: 36px;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 10px;
    align-items: center;
    .placeholder{
      font-size: 15px;
      margin: 5px;
    }
  }
}
</style>